package com.chenfan.mcn.model.vo;

import com.chenfan.mcn.enums.ArchivingStatusEnum;
import com.chenfan.mcn.enums.YearStatusEnum;
import com.chenfan.mcn.model.YearSupplementaryAgreement;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Objects;

/**
 * @Author liuyang
 * @Date 2021/1/19
 * @Time 20:00
 * @Version V1.0
 **/
@EqualsAndHashCode(callSuper = true)
@Data
public class YearSupplementaryAgreementVO extends YearSupplementaryAgreement {


    /**
     * 年框合同补充协议号
     */
    private String agreementCode;

    /**
     * 年框合同code
     */
    private String yearCode;

    /**
     * 变更前我司主体名称
     */
    private String contactSubjectBeforeChangeName;

    /**
     * 变更后我司主体名称
     */
    private String contactSubjectAfterChangeName;

    /**
     * 审批流实例id数组拼接
     */
    private String flowIds;

    /**
     * 审批流实例id
     */
    private Long flowId;

    /**
     * 审批流节点名称
     */
    private String flowStatusName;

    /**
     * 归档状态名称
     */
    private String archivingStatusName;


    public String getArchivingStatusName() {
        if (Objects.nonNull(getArchivingStatus())) {
            return ArchivingStatusEnum.getStatusName(getArchivingStatus());
        }
        return null;
    }

    public String getStatusName() {
        if (Objects.nonNull(getStatus())) {
            return YearStatusEnum.getStatusName(getStatus());
        }
        return null;
    }

}
